package com.wifi.a007.wifiFragment;

import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.Toast;

import com.wifi.a007.R;
import com.wifi.a007.ViewName;


/**
 * Created by liyuanjing on 2015/9/28.
 */
public class WebFragment extends Fragment   implements  View.OnClickListener{




    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.web_fragment_main_layout,container,false);

        //init(view);
        ViewName.init(R.layout.web_fragment_main_layout,view);



        return view;
    }

    private void init(View  view){


    }

    @Override
    public void onClick(View view) {

        switch (view.getId()){




        }
    }
    public static void loginByAuto(){
        String urlparams="utf8=%E2%9C%93&authenticity_token=BXpG6P0k82GPsEIpk3Kdoe%2BrJz8%2FtQB8YNZB9R%2FROnY%3D&redirect_to_url=&user%5Blogin%5D=915743805%40qq.com&user%5Bpassword%5D=my915743805&user%5Bremember_me%5D=0&commit=Sign+in";
        ViewName.webView.postUrl("https://git.oschina.net/login",urlparams.getBytes());


    }

    private Handler hander=new Handler() {

        @Override
        public void handleMessage(Message msg) {
            switch (msg.what) {

                case 0x009:



                    break;


                default:


            }

        }

    };
}
